<?php
/**
 * DotHerbert
 *
 * @package    core
 * @subpackage stub
 * @copyright  2009 extreme-programmers
 * @license    http://dotherbert.extreme-programmers.com/license   BSD License
 * @version    $Id:$
 */

namespace dotherbert\core\stub;

/**
 * Stub
 *
 * @package    core
 * @subpackage stub
 * @author     Johannes Trink <johannes.trink@extreme-programmers.com>
 */
abstract class Stub
{
    /**
     * Constructor
     */
    protected function __construct()
    {
    }

    /**
     * Clone
     */
    protected function __clone()
    {
    }

    /**
     * Get instance
     *
     * @return Stub
     */
    public static function getInstance()
    {
        if (null === static::$instance) {
            static::$instance = new static();
        }
        return static::$instance;
    }

    /**
     * Unset instance
     *
     * @return void
     */
    public static function unsetInstance()
    {
        static::$instance = null;
    }
}